<template>
  <div>
    <header>
      <h1>数据可视化echarts</h1>
    </header>
    <!-- 大容器 -->
    <section class="container">
      <!-- 左 -->
      <section class="itemLeft">
        <item-page>
          <item-one></item-one>
        </item-page>
        <item-page>
          <item-two></item-two>
        </item-page>
      </section>
      <!-- 中 -->
      <section class="itemCenter">
        <map-page></map-page>
      </section>
      <!-- 右 -->
      <section class="itemRight">
        <item-page>
          <item-three></item-three>
        </item-page>
        <item-page>
          <item-four></item-four>
        </item-page>
      </section>
    </section>
  </div>
</template>

<script>
import ItemPage from "@/components/itemPage.vue"

import ItemOne from "@/components/itemOne.vue"
import ItemTwo from "@/components/itemTwo.vue"
import ItemThree from "@/components/itemThree.vue"
import ItemFour from "@/components/itemFour.vue"
import MapPage from "@/components/mapPage.vue"

import {inject} from "vue"

export default {
  components: {
  ItemPage,ItemOne,ItemTwo,ItemThree,ItemFour,
    MapPage
  },
  setup() {
    let $echarts = inject("echarts")
    let $http = inject("axios")
    console.log($echarts)
    console.log($http)
  }
}
</script>

<style lang="less">
header {
  height: .75rem;
  width: 100%;
  h1 {
    font-size: .375rem;
    color: #fff;
    text-align: center;
    line-height: .75rem;
  }
}

.container {
  min-width: 1200px;
  max-width: 2048px;
  margin: 0 auto;
  padding: .125rem .125rem 0;
  display: flex;
  .itemLeft,.itemRight {
    flex: 3;
  }
  .itemCenter {
    flex: 5;
    height: 10.125rem;
    border: 1px solid gray;
    border-radius: .125rem;
    background-color: rgba(65,70,95,.85);
    padding: .125rem;
    margin: .25rem;
  }
}
</style>